home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 19 / Amiga Plus Leser CD 19.iso / Tools / ShareMailGiftware / proof.library / dev / includes / proof / proof.h < prev   
Encoding:
C/C++ Source or Header  |  2002-11-17  |  9.0 KB  |  205 lines

  1. #ifndef PROOF_H
  2. #define PROOF_H
  3.  
  4. /*
  5. **    $VER: proof.h 2.1 (30.6.2000)
  6. **
  7. **    Public structures and defintions for proof.library.
  8. **
  9. **    Trailing values:
  10. **        B - Bit
  11. **        F - Flag (bit value)
  12. **        V - Value
  13. */
  14.  
  15. #ifndef EXEC_TYPES_H
  16. #include "exec/types.h"
  17. #endif
  18.  
  19. #ifndef DOS_DOS_H
  20. #include <dos/dos.h>
  21. #endif
  22.  
  23. #ifndef UTILITY_TAGITEM_H
  24. #include <utility/tagitem.h>
  25. #endif
  26.  
  27. #ifndef IMAGEGENERIC_H
  28. #include <imageio/imagegeneric.h>
  29. #endif
  30.  
  31. /*========================================================================*/
  32. /* ProofHeader - Version */
  33. #define PROOF_VERSION (1)
  34.  
  35. /* ProofHeader - BodyType */
  36. #define PHBV_CUSTOM 0 /* Data in PBDY is in a user defined format */
  37. #define PHBV_JFIF 1 /* Data in PBDY is in jfif format */
  38.  
  39. /*========================================================================*/
  40. /* ProofDescription  - ImageType */
  41. #ifdef PROOF_COMPAT
  42.     #define PDIV_UNKNOWN IMGF_UNKNOWN
  43.     #define PDIV_ANIM IMGF_ANIM
  44.     #define PDIV_BMP IMGF_BMP
  45.     #define PDIV_FAXX IMGF_FAXX
  46.     #define PDIV_GIF IMGF_GIF
  47.     #define PDIV_ICON IMGF_ICON
  48.     #define PDIV_ILBM IMGF_ILBM
  49.     #define PDIV_IFF24 IMGF_IFF24
  50.     #define PDIV_JPEG IMGF_JPEG
  51.     #define PDIV_MACPAINT IMGF_MACPAINT
  52.     #define PDIV_PBM IMGF_PBM
  53.     #define PDIV_PCD IMGF_PCD
  54.     #define PDIV_PCX IMGF_PCX
  55.     #define PDIV_PICT IMGF_PICT
  56.     #define PDIV_PNG IMGF_PNG
  57.     #define PDIV_POSTSCRIPT IMGF_POSTSCRIPT
  58.     #define PDIV_TARGA IMGF_TARGA
  59.     #define PDIV_TIFF IMGF_TIFF
  60.     #define PDIV_YCRCB IMGF_YCRCB
  61.     #define PDIV_YUVN IMGF_YUVN
  62.     #define PDIV_SCREEN IMGF_SCREEN
  63.     #define PDIV_MPEG IMGF_MPEG
  64. #endif
  65.  
  66. /* ProofDescription - Format (bits/flags) */
  67. #ifdef PROOF_COMPAT
  68.     #define PDFB_PLANAR IMFB_PLANAR
  69.     #define PDFB_CHUNKY IMFB_CHUNKY
  70.     #define PDFB_HAM6 IMFB_HAM6
  71.     #define PDFB_HALFBRITE IMFB_HALFBRITE
  72.     #define PDFB_HAM8 IMFB_HAM8
  73.     #define PDFB_24BIT IMFB_24BIT
  74.     #define PDFB_PALETTE IMFB_PALETTE
  75.     #define PDFB_GREY IMFB_GREY
  76.  
  77.     #define PDFF_PLANAR IMFF_PLANAR
  78.     #define PDFF_CHUNKY IMFF_CHUNKY
  79.     #define PDFF_HAM6 IMFF_HAM6
  80.     #define PDFF_HALFBRITE IMFF_HALFBRITE
  81.     #define PDFF_HAM8 IMFF_HAM8
  82.     #define PDFF_24BIT IMFF_24BIT
  83.     #define PDFF_PALETTE IMFF_PALETTE
  84.     #define PDFF_GREY IMFF_GREY
  85. #endif
  86.  
  87. /* Image category:
  88.     There are four groups.
  89.     There are 22 bits reserved for categories.
  90.     Each proof can be subscribed to ONE group and ANY number of categories.
  91. */
  92.  
  93. /*========================================================================*/
  94. /* Proof structure */
  95. struct Proof
  96. {
  97.     ULONG ptr; // Private!
  98. };
  99.  
  100. /*========================================================================*/
  101. /* ProofOwner */
  102. struct ProofOwner
  103. {
  104.     ULONG ptr; // Private!
  105. };
  106.  
  107. #define POWN_GROUP_NAME -1 /* Category number for a group name */
  108.  
  109. /*========================================================================*/
  110. /* Proof tag values */
  111. #define PFN_TB ( TAG_USER + 0x80000 )
  112.  
  113. /* ProofHeader tags */
  114. #define PFN_ProofWidth (PFN_TB + 1) /* Height of proof (0..255) [ISG] (UBYTE *, UBYTE) */
  115. #define PFN_ProofHeight (PFN_TB + 2) /* Width of proof (0..255) [ISG] (UBYTE *, UBYTE) */
  116. #define PFN_ProofAspectX (PFN_TB + 3) /* X:Y aspect ratio of proof [ISG] (WORD *, WORD) */
  117. #define PFN_ProofAspectY (PFN_TB + 4) /* X:Y aspect ratio of proof [ISG] (WORD *, WORD) */
  118. #define PFN_ProofQuestionable (PFN_TB + 5) /* Equivilant to PHDF_QUESTIONABLE [ISG] (BOOL *, BOOL) */
  119. #define PFN_ProofBodyType (PFN_TB + 6) /* Format to store proof image data [ISG] (get=UBYTE *)*/
  120. #define PFN_ProofBodyFlags (PFN_TB + 7) /* Additional flags for BodyType [ISG] */
  121.  
  122. /* ProofDescription tags */
  123. #define PFN_ImageWidth (PFN_TB + 20) /* Height of original image [ISG] (ULONG *, ULONG) */
  124. #define PFN_ImageHeight (PFN_TB + 21) /* Width of original image [ISG] (ULONG *, ULONG) */
  125. #define PFN_ImageFileSize (PFN_TB + 22) /* File size of original image [ISG] (ULONG *, ULONG) */
  126. #define PFN_ImageType (PFN_TB + 23) /* Pass in an ImageType [ISG] (UBYTE *, UBYTE) */
  127. #define PFN_ImageDepth (PFN_TB + 24) /* Depth of original image [ISG] (UBYTE *, UBYTE) */
  128. #define PFN_ImageGroup (PFN_TB + 25) /* Pass in a group (0..3) [ISG] */
  129. #define PFN_ImageCategory (PFN_TB + 26) /* Pass in a category (22 bits) [ISG] */
  130. #define PFN_ImagePlanar (PFN_TB + 27) /* Equivilant to TDSL_PLANAR [ISG] */
  131. #define PFN_ImageChunky (PFN_TB + 28) /* Equivilant to TDSL_CHUNKY [ISG] */
  132. #define PFN_ImageHAM6 (PFN_TB + 29) /* Equivilant to TDSL_HAM6 [ISG] */
  133. #define PFN_ImageHalfBrite (PFN_TB + 30) /* Equivilant to TDSL_HALFBRITE [ISG] */
  134. #define PFN_ImageHAM8 (PFN_TB + 31) /* Equivilant to TDSL_HAM8 [ISG] */
  135. #define PFN_Image24Bit (PFN_TB + 32) /* Equivilant to TDSL_24BIT [ISG] */
  136. #define PFN_ImageFormat (PFN_TB + 33) /* Bulk definitions of ProofDescription->Format. Pass in PDFF_? values [ISG] (UBYTE *, UBYTE) */
  137. #define PFN_CategoryOwner (PFN_TB + 34) /* Category owner ID [ISG] (UBYTE *, UBYTE) */
  138.  
  139. /* LoadThumbnail() tags */
  140. #define PFN_AllowPhotoAlbum PFN_TB + 40 /* Allow photoalbum jpeg thumbnail compatibilty [] (BOOL) */
  141. #define PFN_TestProofByProtection PFN_TB + 41 /* If TRUE, use the protection bits to determine a proof file (negates PFN_AllowPhotoAlbum) [] (BOOL) */
  142.  
  143. /* SaveThumbnail() tags */
  144. #define PFN_ImageName PFN_TB + 50 /* DOS filename of original image [ISG] (char **, char *) */
  145. #define PFN_ImagePath PFN_TB + 51 /* Path of original image [ISG] (char **, char *) */
  146. #define PFN_ImagePathName PFN_TB + 52 /* Path and name of original image; combines ImageName and ImagePath tags [IS] (char *) */
  147. #define PFN_ProofPath PFN_TB + 53 /* Path to store proof [] */
  148. #define PFN_Comment PFN_TB + 54 /* Comment associated with the proof [ISG] (char **, char *) */
  149. #define PFN_DescriptionChunk PFN_TB + 55 /* Store a description chunk [] */
  150. #define PFN_RGBTripletBuffer PFN_TB + 56 /* Points to rgb triplet source buffer [] */
  151. #define PFN_CustomBuffer PFN_TB + 57 /* Points to source/dest buffer, for PHBV_CUSTOM [] (UBYTE **, UBYTE *) */
  152. #define PFN_CustomBufferSize PFN_TB + 58 /* Size in bytes of custom buffer, for PHBV_CUSTOM [] (ULONG *, ULONG) */
  153. #define PFN_JFIFQuality PFN_TB + 59 /* Quality of JFIF storage (passed onto jpeg.library) [] */
  154. #define PFN_Buffer PFN_TB + 60 /* Points to proof image buffer (may be compressed - usually jpeg) [ISG] (UBYTE *, UBYTE **) */
  155. #define PFN_BufferSize PFN_TB + 61 /* Size in bytes of proof image buffer (may be compressed - usually jpeg) [ISG] (ULONG, ULONG *) */
  156.  
  157. /* GetProofAttrs tags */
  158. #define PFN_ProofPathName PFN_TB + 70 /* Path and name of proof [SG] (char ** or char *) */
  159. #define PFN_ProofVersion PFN_TB + 71 /* Version of proof structure [G] (UBYTE *) */
  160. #define PFN_ProofSaveable PFN_TB + 72 /* Is this proof saveable [G] (BOOL *) */
  161. #define PFN_TextImageType PFN_TB + 73 /* Returns pointer to a text descriptor of the original image [G] (char **) */
  162. #define PFN_TextImageDesc PFN_TB + 74 /* Copies into the supplied pointer a text descriptor of the image format [G] (char *) */
  163. #define PFN_ProofLinked PFN_TB + 75 /* Returns TRUE if the proof is linked [G] (BOOL *) */
  164.  
  165. /* Memory control tags */
  166. #define PFN_MemoryPool PFN_TB + 80 /* All de/allocs are on this memory pool [] (void *) */
  167.  
  168. /* Miscellaneous tags */
  169. #define PFN_UserData PFN_TB + 90 /* [ISG] Set/get user data */
  170.  
  171. /* ProofOwner tags */
  172. #define PFN_ProofOwnerID PFN_TB + 100 /* Owner ID of this ProofOwner structure [ISG] (UBYTE *, UBYTE) */
  173. #define PFN_ProofOwnerIdent PFN_TB + 101 /* An identification string for this ProofOwner structure [ISG] (char *, char **) */
  174. #define PFN_ProofOwnerName PFN_TB + 102 /* The filename to save into [] (char *) */
  175.  
  176. /*========================================================================*/
  177. /* Defined error return codes */
  178. #define PFERR_NONE 0 /* No error */
  179. #define PFERR_NOTPROOF 1 /* File is not a proof */
  180. #define PFERR_NOIFFPARSELIBRARY 2 /* iffparse.library isn't available */
  181. #define PFERR_NOIFFHANDLE 3 /* Can't allocate an IFF handle */
  182. #define PFERR_FILEEXISTS 4 /* Destination file already exists */
  183. #define PFERR_CANTCREATEFILE 5 /* Can't open destination file */
  184. #define PFERR_CANTCREATEIFFFILE 6 /* Can't attach IFF stream handler */
  185. #define PFERR_NOMEMORY 7 /* Can't allocate any memory */
  186. #define PFERR_CANTOPENFILE 8 /* Can't open the specified file */
  187. #define PFERR_BADIFFFORM 9 /* File has bad IFF structure - corrupted */
  188. #define PFERR_NOSOURCEBUFFER 10 /* No source buffer supplied */
  189. #define PFERR_NODESTBUFFER 11 /* No destination buffer pointer supplied */
  190. #define PFERR_NOTCUSTOM 16 /* Body data is not in a custom format */
  191. #define PFERR_CUSTOMBODY 17 /* Body data is in a custom format */
  192. #define PFERR_MISSINGTARGET 18 /* Missing or NULL target object in source taglist */
  193. #define PFERR_NOTLINKED 19 /* Proof does not contain a path link */
  194. #define PFERR_NOPROOFPTR 20 /* No proof pointer supplied */
  195. #define PFERR_CANTDECOMPRESS 21 /* Cant decompress the body data */
  196. #define PFERR_CANTCOMPRESS 22 /* Cant compress the body data */
  197. #define PFERR_NODESCRIPTOR 23 /* The proof hasnt got an image descriptor */
  198. #define PFERR_INCOMPATABLE 24 /* The original file is not save compatable  */
  199. #define PFERR_NOOWNERPTR 25 /* No proof owner pointer supplied */
  200. #define PFERR_NOTOWNER 26 /* File is not a proof owner file */
  201. #define PFERR_NOCATEGORYNAME 27 /* No category name supplied */
  202. #define PFERR_NOFREECATEGORY 28 /* No free category bits available in this group */
  203.  
  204. #endif /* PROOF_H */
  205.